4.5 AD FS Adapter Mobile logging

The AD FS Adapter provides both its own logging and Windows Event logging.

4.5.1 Setting up AD FS Adapter Mobile logging

The AD FS Adapter Mobile log file has a rolling interval of a day, which means that a new file is created if needed each day.

Entries in the log file use the following template:

YYYY-MM-DD HH-MM-SS.mmm +UTC [Log Level shortened] (thread id) message

For example:

2020-05-12 09:16:30.786 +00:00 [INF] (10) mTLS Client <- Web REPLY: {"status":"Success"}

You can change the location of the log file, and the logging event level.

To configure the logging settings:

  1. In the ADFS_Adapter_Mobile folder, open the following file in a text editor:

    MobileAdfsAdapter.json

    This is a JSON file that contains the configuration settings for the AD FS Adapter Mobile . For more information on this file, see section 4.4.1, Configuration file.

  2. Edit the following values:

    • logFilePath – type the full path and name of the text file you want to use for logging. Use double backslashes in the path.

      The date is automatically inserted before the file extension.

      To switch off logging, set this to an empty string "". This is the default.

      For example:

      "C:\\Logs\\mobile-cust-auth-log-.txt"

      This produces logs in the C:\Logs\ folder with filenames similar to:

      mobile-cust-auth-log-20201231.txt

      Note: You must set up permissions on this folder so that the AD FS service account can write to this location.

    • logLevel – type the level of logging you want to occur.

      From most logging to least logging, the levels you can use are:

      • Verbose
      • Debug
      • Information
      • Warning
      • Error – this is the default level.
      • Fatal
  3. Save the MobileAdfsAdapter.json file.
  4. Run the ReconfigureADFSProvider.ps1 PowerShell script to apply the changes.

    See section 4.4.1, Configuration file for details.

4.5.2 Viewing the Windows Event log

When you have installed and configured the AD FS Adapter Mobile as an authentication method for a Relying Party Trust, when an authentication process begins, the AD FS Adapter Mobile raises a Windows application event showing the configuration loaded when AD FS started the AD FS Adapter Mobile. This shows the latest AD FS Adapter Mobile configuration provided by the installer or reconfiguration script.

If the AD FS Adapter Mobile encounters a problem, it raises a Windows application error event describing the problem.

To see these events, go to:

Event Viewer > Windows Logs > Application

Additionally, If the calling AD FS service detects a problem from the AD FS Adapter Mobile, it raises an error event in the following location describing the problem from the AD FS point of view.

Event Viewer > Applications and Service Logs > AD FS > Admin